package com.shushan.ui;

import android.content.Context;
import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;
import android.view.Gravity;

import com.shushan.shushanbao.R;


/**
 * @ClassName: TextViewBox
 * @Desciption: //单词练习题型3用到的UI
 * @author: zhangshihao
 * @date: 2018-07-27
 */
public class TextViewBox extends AppCompatTextView {

    private int index = 0;

    public TextViewBox(Context context) {
        super(context);
        initView(context);
    }

    public TextViewBox(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    private void initView(Context context){
        setBackgroundResource(R.drawable.bg_white_stroke_gray_radius_7);
        setGravity(Gravity.CENTER);
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

}
